<?php
use frontend\widgets\post\PostWidget;
use frontend\widgets\hot\HotWidget;
use yii\base\Widget;
use yii\helpers\Url;
use frontend\widgets\tag\TagWidget;
?>
<style>
    .aside-author {
        padding: 30px 5px;
        word-break: break-all;
        background: #f3f5f7;
        text-align: center;
    }
</style>

<div class="aside-author">
    <div class="p clearfix">
        <a href="#" class="l" >
            <img class="img-circle" width="52" height="52" src="<?=$data['user_info']['head_img']?:'/statics/images/avatar/small.jpg';?>">
            <!--            https://image.niwoxuexi.com/avatar/27454dec2a-2019080207402276788.jpg-->
        </a>
    </div>
    <p class="u-nick-warp">
        <a class="nick" href="#" >
            <?=$data['user_info']['username'];?> 的博客
        </a>
    </p>
    <span class="user-job"><?=$data['user_info']['email'];?></span>
    <span class="user-desc">
                    </span>
    <div class="btn-box clearfix">
        <a href="#"  class="article-num r-bor l">
            <span><?=$data['user_count']['posts_count']?:0;?></span> 篇博客
        </a>
        <a href="#"  class="article-recom l">
            <span><?=$data['user_count']['browser_count']?:0;?></span> 次访问
        </a>
    </div>
</div>
<div class="row">
    <div class="col-lg-9"><?=PostWidget::widget(['user_id'=>$data['user_id'],'search_date'=>$data['search_date']]);?>
    </div>
    <div class="col-lg-3">
        <div class="panel">

<!--            <a href="--><?//=Url::to(['posts/create'])?><!--"><button class="btn btn-warning no-radius btn-sm pull-full">创建文章</button></a>-->
        </div>
        <div class="panel">
            <h2>文章归档</h2>
            <ul>
                <?php foreach ($data['date_arr'] as $k=>$v):?>
                    <li><a href="<?=Url::to(['member/index','date'=>$v['time'],'id'=>$data['user_id']])?>"><?=$v['datestring'];?></a></li>
                    <!--                <li><a href="#">2015 年九月</a></li>-->
                    <!--                <li><a href="#">2014 年九月</a></li>-->
                <?php endforeach;?>
            </ul>
        </div>
        <div class="panel">
            <!--热门浏览组件调用-->
            <?=HotWidget::widget(['user_id'=>$data['user_id']]);?>
        </div>
        <!--标签云组件调用-->
        <?=TagWidget::widget();?>
    </div>
</div>